<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>inf-gtk-browser-model</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.0">
<link rel="home" href="index.html" title="libinfgtk-0.4 Reference Manual">
<link rel="up" href="ch01.html" title="libinfgtk API">
<link rel="prev" href="InfGtkBrowserView.html" title="InfGtkBrowserView">
<link rel="next" href="InfGtkBrowserStore.html" title="InfGtkBrowserStore">
<meta name="generator" content="GTK-Doc V1.15 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="InfGtkBrowserView.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">libinfgtk-0.4 Reference Manual</th>
<td><a accesskey="n" href="InfGtkBrowserStore.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libinfgtk-0.4-inf-gtk-browser-model.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#libinfgtk-0.4-inf-gtk-browser-model.description" class="shortcut">Description</a>
                   | 
                  <a href="#libinfgtk-0.4-inf-gtk-browser-model.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#libinfgtk-0.4-inf-gtk-browser-model.prerequisites" class="shortcut">Prerequisites</a>
                   | 
                  <a href="#libinfgtk-0.4-inf-gtk-browser-model.implementations" class="shortcut">Known Implementations</a>
                   | 
                  <a href="#libinfgtk-0.4-inf-gtk-browser-model.signals" class="shortcut">Signals</a>
</td></tr>
</table>
<div class="refentry" title="inf-gtk-browser-model">
<a name="libinfgtk-0.4-inf-gtk-browser-model"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libinfgtk-0.4-inf-gtk-browser-model.top_of_page"></a>inf-gtk-browser-model</span></h2>
<p>inf-gtk-browser-model</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="libinfgtk-0.4-inf-gtk-browser-model.synopsis"></a><h2>Synopsis</h2>
<a name="InfGtkBrowserModel"></a><pre class="synopsis">#define             <a class="link" href="libinfgtk-0.4-inf-gtk-browser-model.html#INF-GTK-TYPE-BROWSER-MODEL-STATUS:CAPS" title="INF_GTK_TYPE_BROWSER_MODEL_STATUS">INF_GTK_TYPE_BROWSER_MODEL_STATUS</a>
                    <a class="link" href="libinfgtk-0.4-inf-gtk-browser-model.html#InfGtkBrowserModel-struct" title="InfGtkBrowserModel">InfGtkBrowserModel</a>;
enum                <a class="link" href="libinfgtk-0.4-inf-gtk-browser-model.html#InfGtkBrowserModelStatus" title="enum InfGtkBrowserModelStatus">InfGtkBrowserModelStatus</a>;
enum                <a class="link" href="libinfgtk-0.4-inf-gtk-browser-model.html#InfGtkBrowserModelColumn" title="enum InfGtkBrowserModelColumn">InfGtkBrowserModelColumn</a>;
<span class="returnvalue">void</span>                <a class="link" href="libinfgtk-0.4-inf-gtk-browser-model.html#inf-gtk-browser-model-set-browser" title="inf_gtk_browser_model_set_browser ()">inf_gtk_browser_model_set_browser</a>   (<em class="parameter"><code><a class="link" href="libinfgtk-0.4-inf-gtk-browser-model.html#InfGtkBrowserModel"><span class="type">InfGtkBrowserModel</span></a> *model</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkTreeModel.html#GtkTreePath"><span class="type">GtkTreePath</span></a> *path</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
                                                         <em class="parameter"><code><a href="../libinfinity-0.4/InfcBrowser.html"><span class="type">InfcBrowser</span></a> *browser</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libinfgtk-0.4-inf-gtk-browser-model.html#inf-gtk-browser-model-resolve" title="inf_gtk_browser_model_resolve ()">inf_gtk_browser_model_resolve</a>       (<em class="parameter"><code><a class="link" href="libinfgtk-0.4-inf-gtk-browser-model.html#InfGtkBrowserModel"><span class="type">InfGtkBrowserModel</span></a> *model</code></em>,
                                                         <em class="parameter"><code><a href="../libinfinity-0.4/InfDiscovery.html"><span class="type">InfDiscovery</span></a> *discovery</code></em>,
                                                         <em class="parameter"><code><a href="../libinfinity-0.4/InfDiscovery.html#InfDiscoveryInfo"><span class="type">InfDiscoveryInfo</span></a> *info</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="libinfgtk-0.4-inf-gtk-browser-model.html#inf-gtk-browser-model-browser-iter-to-tree-iter" title="inf_gtk_browser_model_browser_iter_to_tree_iter ()">inf_gtk_browser_model_browser_iter_to_tree_iter</a>
                                                        (<em class="parameter"><code><a class="link" href="libinfgtk-0.4-inf-gtk-browser-model.html#InfGtkBrowserModel"><span class="type">InfGtkBrowserModel</span></a> *model</code></em>,
                                                         <em class="parameter"><code><a href="../libinfinity-0.4/InfcBrowser.html"><span class="type">InfcBrowser</span></a> *browser</code></em>,
                                                         <em class="parameter"><code><a href="../libinfinity-0.4/libinfinity-0.4-InfcBrowserIter.html#InfcBrowserIter"><span class="type">InfcBrowserIter</span></a> *browser_iter</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *tree_iter</code></em>);
</pre>
</div>
<div class="refsect1" title="Object Hierarchy">
<a name="libinfgtk-0.4-inf-gtk-browser-model.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  GInterface
   +----InfGtkBrowserModel
</pre>
</div>
<div class="refsect1" title="Prerequisites">
<a name="libinfgtk-0.4-inf-gtk-browser-model.prerequisites"></a><h2>Prerequisites</h2>
<p>
InfGtkBrowserModel requires
 <a href="http://library.gnome.org/devel/gtk/unstable/GtkTreeModel.html">GtkTreeModel</a> and  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>.</p>
</div>
<div class="refsect1" title="Known Implementations">
<a name="libinfgtk-0.4-inf-gtk-browser-model.implementations"></a><h2>Known Implementations</h2>
<p>
InfGtkBrowserModel is implemented by
 <a class="link" href="InfGtkBrowserModelFilter.html" title="InfGtkBrowserModelFilter">InfGtkBrowserModelFilter</a>,  <a class="link" href="InfGtkBrowserModelSort.html" title="InfGtkBrowserModelSort">InfGtkBrowserModelSort</a> and  <a class="link" href="InfGtkBrowserStore.html" title="InfGtkBrowserStore">InfGtkBrowserStore</a>.</p>
</div>
<div class="refsect1" title="Signals">
<a name="libinfgtk-0.4-inf-gtk-browser-model.signals"></a><h2>Signals</h2>
<pre class="synopsis">
  "<a class="link" href="libinfgtk-0.4-inf-gtk-browser-model.html#InfGtkBrowserModel-set-browser" title='The "set-browser" signal'>set-browser</a>"                                    : Run Last
</pre>
</div>
<div class="refsect1" title="Description">
<a name="libinfgtk-0.4-inf-gtk-browser-model.description"></a><h2>Description</h2>
<p>
</p>
</div>
<div class="refsect1" title="Details">
<a name="libinfgtk-0.4-inf-gtk-browser-model.details"></a><h2>Details</h2>
<div class="refsect2" title="INF_GTK_TYPE_BROWSER_MODEL_STATUS">
<a name="INF-GTK-TYPE-BROWSER-MODEL-STATUS:CAPS"></a><h3>INF_GTK_TYPE_BROWSER_MODEL_STATUS</h3>
<pre class="programlisting">#define INF_GTK_TYPE_BROWSER_MODEL_STATUS          (inf_gtk_browser_model_status_get_type())
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="InfGtkBrowserModel">
<a name="InfGtkBrowserModel-struct"></a><h3>InfGtkBrowserModel</h3>
<pre class="programlisting">typedef struct _InfGtkBrowserModel InfGtkBrowserModel;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="enum InfGtkBrowserModelStatus">
<a name="InfGtkBrowserModelStatus"></a><h3>enum InfGtkBrowserModelStatus</h3>
<pre class="programlisting">typedef enum _InfGtkBrowserModelStatus {
  INF_GTK_BROWSER_MODEL_INVALID,
  INF_GTK_BROWSER_MODEL_DISCOVERED,
  INF_GTK_BROWSER_MODEL_RESOLVING,
  INF_GTK_BROWSER_MODEL_DISCONNECTED,
  INF_GTK_BROWSER_MODEL_CONNECTING,
  INF_GTK_BROWSER_MODEL_CONNECTED,
  INF_GTK_BROWSER_MODEL_ERROR
} InfGtkBrowserModelStatus;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="enum InfGtkBrowserModelColumn">
<a name="InfGtkBrowserModelColumn"></a><h3>enum InfGtkBrowserModelColumn</h3>
<pre class="programlisting">typedef enum _InfGtkBrowserModelColumn {
  INF_GTK_BROWSER_MODEL_COL_DISCOVERY_INFO,
  INF_GTK_BROWSER_MODEL_COL_DISCOVERY,
  INF_GTK_BROWSER_MODEL_COL_BROWSER,
  INF_GTK_BROWSER_MODEL_COL_STATUS, /* only toplevel */
  INF_GTK_BROWSER_MODEL_COL_NAME,
  INF_GTK_BROWSER_MODEL_COL_ERROR,
  INF_GTK_BROWSER_MODEL_COL_NODE,

  INF_GTK_BROWSER_MODEL_NUM_COLS
} InfGtkBrowserModelColumn;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="inf_gtk_browser_model_set_browser ()">
<a name="inf-gtk-browser-model-set-browser"></a><h3>inf_gtk_browser_model_set_browser ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_gtk_browser_model_set_browser   (<em class="parameter"><code><a class="link" href="libinfgtk-0.4-inf-gtk-browser-model.html#InfGtkBrowserModel"><span class="type">InfGtkBrowserModel</span></a> *model</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkTreeModel.html#GtkTreePath"><span class="type">GtkTreePath</span></a> *path</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
                                                         <em class="parameter"><code><a href="../libinfinity-0.4/InfcBrowser.html"><span class="type">InfcBrowser</span></a> *browser</code></em>);</pre>
<p>
Emits the <a class="link" href="libinfgtk-0.4-inf-gtk-browser-model.html#InfGtkBrowserModel-set-browser" title='The "set-browser" signal'><span class="type">"set-browser"</span></a> signal. This is supposed to only
be called by implementations of <a class="link" href="libinfgtk-0.4-inf-gtk-browser-model.html#InfGtkBrowserModel"><span class="type">InfGtkBrowserModel</span></a> whenever they set or
unset a browser on a row.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td>
<td>A <a class="link" href="libinfgtk-0.4-inf-gtk-browser-model.html#InfGtkBrowserModel"><span class="type">InfGtkBrowserModel</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>A <a href="http://library.gnome.org/devel/gtk/unstable/GtkTreeModel.html#GtkTreePath"><span class="type">GtkTreePath</span></a> to a top-level row.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td>A <a href="http://library.gnome.org/devel/gtk/unstable/GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> pointing to the same row.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>browser</code></em> :</span></p></td>
<td>The new <a href="../libinfinity-0.4/InfcBrowser.html"><span class="type">InfcBrowser</span></a> to set.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_gtk_browser_model_resolve ()">
<a name="inf-gtk-browser-model-resolve"></a><h3>inf_gtk_browser_model_resolve ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_gtk_browser_model_resolve       (<em class="parameter"><code><a class="link" href="libinfgtk-0.4-inf-gtk-browser-model.html#InfGtkBrowserModel"><span class="type">InfGtkBrowserModel</span></a> *model</code></em>,
                                                         <em class="parameter"><code><a href="../libinfinity-0.4/InfDiscovery.html"><span class="type">InfDiscovery</span></a> *discovery</code></em>,
                                                         <em class="parameter"><code><a href="../libinfinity-0.4/InfDiscovery.html#InfDiscoveryInfo"><span class="type">InfDiscoveryInfo</span></a> *info</code></em>);</pre>
<p>
Resolves <em class="parameter"><code>info</code></em> and adds the resulting connection to the model. If that
connection is already contained, the original (newly resolved) entry
is removed in favor of the existing entry whose browser might already
have explored (parts of) the server's directory.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td>
<td>A <a class="link" href="libinfgtk-0.4-inf-gtk-browser-model.html#InfGtkBrowserModel"><span class="type">InfGtkBrowserModel</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>discovery</code></em> :</span></p></td>
<td>A <a href="../libinfinity-0.4/InfDiscovery.html"><span class="type">InfDiscovery</span></a> added to <em class="parameter"><code>store</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
<td>A <a href="../libinfinity-0.4/InfDiscovery.html#InfDiscoveryInfo"><span class="type">InfDiscoveryInfo</span></a> discovered by <em class="parameter"><code>discovery</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_gtk_browser_model_browser_iter_to_tree_iter ()">
<a name="inf-gtk-browser-model-browser-iter-to-tree-iter"></a><h3>inf_gtk_browser_model_browser_iter_to_tree_iter ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            inf_gtk_browser_model_browser_iter_to_tree_iter
                                                        (<em class="parameter"><code><a class="link" href="libinfgtk-0.4-inf-gtk-browser-model.html#InfGtkBrowserModel"><span class="type">InfGtkBrowserModel</span></a> *model</code></em>,
                                                         <em class="parameter"><code><a href="../libinfinity-0.4/InfcBrowser.html"><span class="type">InfcBrowser</span></a> *browser</code></em>,
                                                         <em class="parameter"><code><a href="../libinfinity-0.4/libinfinity-0.4-InfcBrowserIter.html#InfcBrowserIter"><span class="type">InfcBrowserIter</span></a> *browser_iter</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *tree_iter</code></em>);</pre>
<p>
Sets <em class="parameter"><code>tree_iter</code></em> to point to the same node <em class="parameter"><code>browser_iter</code></em> refers to
within the model. If <em class="parameter"><code>browser</code></em> is not known to <em class="parameter"><code>model</code></em>, i.e. its connection
was never added to <em class="parameter"><code>model</code></em>, then the function returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> and
<em class="parameter"><code>tree_iter</code></em> is left untouched.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td>
<td>A <a class="link" href="libinfgtk-0.4-inf-gtk-browser-model.html#InfGtkBrowserModel"><span class="type">InfGtkBrowserModel</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>browser</code></em> :</span></p></td>
<td>A <a href="../libinfinity-0.4/InfcBrowser.html"><span class="type">InfcBrowser</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>browser_iter</code></em> :</span></p></td>
<td>A <a href="../libinfinity-0.4/libinfinity-0.4-InfcBrowserIter.html#InfcBrowserIter"><span class="type">InfcBrowserIter</span></a> pointing into <em class="parameter"><code>browser</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>tree_iter</code></em> :</span></p></td>
<td>A <a href="http://library.gnome.org/devel/gtk/unstable/GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> that will be set by this function.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Whether <em class="parameter"><code>tree_iter</code></em> was set.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" title="Signal Details">
<a name="libinfgtk-0.4-inf-gtk-browser-model.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2" title='The "set-browser" signal'>
<a name="InfGtkBrowserModel-set-browser"></a><h3>The <code class="literal">"set-browser"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="libinfgtk-0.4-inf-gtk-browser-model.html#InfGtkBrowserModel"><span class="type">InfGtkBrowserModel</span></a> *model,
                                                        <a href="http://library.gnome.org/devel/gtk/unstable/GtkTreeModel.html#GtkTreePath"><span class="type">GtkTreePath</span></a>        *path,
                                                        <a href="http://library.gnome.org/devel/gtk/unstable/GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a>        *iter,
                                                        <a href="../libinfinity-0.4/InfcBrowser.html"><span class="type">InfcBrowser</span></a>        *browser,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>            user_data)      : Run Last</pre>
<p>
This signal is emitted every time a new browser is inserted to the
model. This means either that a completely new item was inserted, or
that an item providing only a discovery has been resolved (see
<a class="link" href="libinfgtk-0.4-inf-gtk-browser-model.html#inf-gtk-browser-model-resolve" title="inf_gtk_browser_model_resolve ()"><code class="function">inf_gtk_browser_model_resolve()</code></a>).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td>
<td>The <a class="link" href="libinfgtk-0.4-inf-gtk-browser-model.html#InfGtkBrowserModel"><span class="type">InfGtkBrowserModel</span></a> emitting the signal.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>A <a href="http://library.gnome.org/devel/gtk/unstable/GtkTreeModel.html#GtkTreePath"><span class="type">GtkTreePath</span></a> pointing to the newly created browser.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td>A <a href="http://library.gnome.org/devel/gtk/unstable/GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> pointing to the newly created browser.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>browser</code></em> :</span></p></td>
<td>The newly created <a href="../libinfinity-0.4/InfcBrowser.html"><span class="type">InfcBrowser</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.15</div>
</body>
</html>